<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index()
    {
        /**
         * 第二个参数必须是数组,以GET方式传送数据,不给下标以$_GET方式为索引
         */
//        $this->redirect('hello',array( 2),2,'等待');
        /*
         * 斜杠只能为/
         */
        $this->redirect('Test/test',0,2,'准备测试');
    }

    public function hello()
    {
        var_dump($_POST);
        var_dump($_GET);
    }

    public function test()
    {
        $redb = new \Think\Model('Reworld');
        $arr_all = $redb->select();
        array_walk($arr_all,'test1');
        $this->assign('arr_all', $arr_all);
        $this->display();
    }
}